# -*- coding = utf-8 -*-
# @Time : 2022/2/16 14:24
# @File : cup.py
# @Software : PyCharm


class Cup:
    __high = 0
    __volume = 0
    __color = ''
    __texture = ''

    def setHigh(self, high):
        if high < 5.0 or high > 30.0:
            print('温馨提示：高度数据错误！')
        else:
            self.__high = high

    def getHigh(self):
        return self.__high

    def setVolume(self, volume):
        if volume < 0.0 or volume > 10.0:
            print('温馨提示：容积数据错误！')
        else:
            self.__volume = volume

    def getVolume(self):
        return self.__volume

    def setColor(self, color):
        if color == '':
            print('温馨提示：颜色不能为空！')
        else:
            self.__color = color

    def getColor(self):
        return self.__color

    def setTexture(self, texture):
        if texture == '':
            print('温馨提示：材质不能为空！')
        else:
            self.__texture = texture

    def getTexture(self):
        return self.__texture

    def liquid(self, liquid):
        print('这个高', self.__high, 'cm', self.__color, self.__texture,
              '容量为', self.__volume, 'L的水杯', liquid)

    def showMe(self):
        print('这个高', self.__high, 'cm', self.__color, self.__texture,
              '容量为', self.__volume, 'L的水杯')


cup = Cup()
cup.setHigh(20)
cup.setVolume(5)
cup.setColor('黑色的')
cup.setTexture('陶瓷')
cup.liquid('能存放液体')
cup.showMe()
